<?php


require_once '../../app/config/database.php';
$con = mysqli_connect($db['default']['hostname'], $db['default']['username'], $db['default']['password'], $db['default']['database']);

// Check connection
if (mysqli_connect_errno()) {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

$sql = "DROP DATABASE {$db['default']['database']}";
if (mysqli_query($con, $sql)) {
    echo "Drop database successfully";
} else {
    echo "Error drop database: " . mysqli_error($con);
}